#include <gtest/gtest.h>
#include <iostream>
#include "Routine.h"
#include "TERMINATE.h"

TEST(RoutineTest, AddSomeRoutines) {

	Routine routine;
	
	Instruction* instruction1 = new TERMINATE_Instruction();
	Instruction* instruction2 = new TERMINATE_Instruction();
	Instruction* instruction3 = new TERMINATE_Instruction();
	
	routine.addInstruction(instruction1);
	routine.addInstruction(instruction2);
	routine.addInstruction(instruction3);
	
	ASSERT_EQ(routine.getInstruction(0), instruction1);
	ASSERT_EQ(routine.getInstruction(1), instruction2);
	ASSERT_EQ(routine.getInstruction(2), instruction3);
	ASSERT_EQ(routine.nrOfInstructions(), 3);

}